using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace KeyCore.Domain.Model
{
    public class Bank
    {
        public Bank()
        {
            KontoBankowe = new HashSet<KontoBankowe>();
        }

        public int BankId { get; set; }
        public string BankNazwa { get; set; }

        public virtual ICollection<KontoBankowe> KontoBankowe { get; set; }
    }

    public class KontoBankoweConfiguration : EntityTypeConfiguration<Bank>
    {
        public KontoBankoweConfiguration()
        {
            HasKey(k => k.BankId)
                .Property(p => p.BankId)
                .HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity);
        }
    }
}